-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add _.insert to array.builders #240
base: master
Are you sure you want to change the base?
Conversation
Throw TypeError if insert receives something other than an array
@@ -208,8 +222,8 @@ _.keepIndexed([1,2,3], function(k) { | |||
If you return either `null` or `undefined` then the result is dropped from the resulting array: | |||
|
|||
```javascript | |||
_.keepIndexed(['a','b','c'], function(k, v) { | |||
if (k === 1) return v; | |||
_.keepIndexed(['a','b','c'], function(k, v) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jgonggrijp sorry, I didn't see the PR very deeply, but these look like to me only whitespace specific changes and also the one at line 294 below, is it done due to some eslint formatting work or if not deliberate,then maybe better to remove them as it might cause confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right about that. I put them on separate commits, though. So you can review the commits one by one in order to skip most of the whitespace changes (click "Prev"/"Next" in the top right to move between the commits).
This is the continuation of #199, which will be merged together with the current PR. @acarrau will get the credit for his past work.
I have added the following changes:
Array.prototype.splice
, which works on any array-like object; I have adapted the type check accordingly.@carpben @mafiosso @sktguha @yashshah1 a review by one of you would be welcome.